<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::group('user', function () {
    Route::post('login', 'login');//登录
    Route::post('register', 'register');//注册
    Route::post('refreshToken', 'refreshToken');//刷新token
})->prefix('UserController/');

Route::group('material', function () {
    Route::get('getTai', 'getTai');//获取所有钛合金粉末库存
    Route::get('getLv', 'getLv');//获取所有铝合金粉末库存
    Route::get('getTaiReceive', 'getTaiReceive');//获取所有钛合金粉末领用记录
    Route::get('getLvReceive', 'getLvReceive');//获取所有铝合金粉末领用记录
    Route::post('taiReceive', 'taiReceive');//上传钛粉末领用数据
    Route::post('lvReceive', 'lvReceive');//上传钛粉末领用数据
    Route::get('getSubstrates', 'getSubstrates');//获取所有基板库存
    Route::post('substrates', 'substrates');//上传基板库存数据
})->prefix('RawMaterialController/');


Route::group('devices', function () {
    Route::get('getDevices', 'getDevices')->cache(3600);//获取所有设备列表
    Route::get('getRecord/:id', 'getRecord');//获取所有选择设备的数据
    Route::post('setRecord', 'setRecord');//添加一个保养记录
})->prefix('DevicesController/');

Route::group('prints', function () {
    Route::get('getPrints/:id', 'getPrints');
    Route::post('setPrints', 'setPrints');
    Route::get('getPrintStatus/:id', 'getPrintStatus');
    Route::post('printStatus', 'printStatus');
    Route::post('importFile', 'importFile');
})->prefix('PrintsController/');

Route::group('file', function () {
    Route::get('getFileData','getFileData');
    Route::post('FileData','FileData');
    Route::post('importFile', 'importFile');
})->prefix('FiledataController/');